<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户管理</title>
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<link href="http://static.mttang.com/css/Public.css" rel="stylesheet"
	type="text/css" />
<link href="http://static.mttang.com/css/recharge.css" rel="stylesheet"
	type="text/css" />
<link type="text/css" rel="stylesheet"
	href="http://static.mttang.com/css/validator.css"></link>
<script type="text/javascript"
	src="http://static.mttang.com/js/jquery-1.4.2.min.js"></script>
<script src="http://static.mttang.com/js/formValidator.js"
	type="text/javascript" charset="UTF-8"></script>
<script src="http://static.mttang.com/js/formValidatorRegex.js"
	type="text/javascript" charset="UTF-8"></script>
<script src="../javascripts/sysValidate.js"></script>
</head>
<body onload="userFormValidate();">
<div id="man_zone">
<center><c:out value="${bean.message}" /></center>
<form action="user.do?method=update" id="form1" method="post">
<table class="table_style" border="0" align="center" cellpadding="3"
	cellspacing="1">
	<tr>
		<td class="left_title_1">用户姓名:</td>
		<td><input type="text" id="name" name="name"
			value="<c:out value='${success_view.name}'/>" /></td>
		<td class="text_tip">
		<div id="nameTip"></div>
		</td>
	</tr>
	<tr>
	<tr>
		<td class="left_title_2">用户工号:</td>
		<td><input type="text" id="empno" name="empno"
			onblur="empnoUnique();"
			value="<c:out value='${success_view.empno}'/>" /> <input
			type="hidden" id="empno1" name="empno1"
			value="<c:out value='${success_view.empno}'/>" /></td>
		<td class="text_tip">
		<div id="empnoTip"></div>
		</td>
	</tr>
	<tr>
		<td class="left_title_1">用户电话:</td>
		<td><input type="text" id="phone" name="phone"
			value="<c:out value='${success_view.phone}'/>" /></td>
		<td class="text_tip">
		<div id="phoneTip"></div>
		</td>
	</tr>
	<tr>
		<td class="left_title_2">用户邮箱:</td>
		<td><input type="text" id="email" name="email"
			value="<c:out value='${success_view.email}'/>" /></td>
		<td class="text_tip">
		<div id="emailTip"></div>
		</td>
	</tr>
	<tr>
		<td class="left_title_1">部门:</td>
		<td><select id="depId" name="depId">
			<option value="">请选择</option>
			<c:if test="${success_view.deplist != null}">
				<c:forEach items="${success_view.deplist}" var="dep"
					varStatus="status">
					<option
						<c:if test="${dep.id == success_view.depId }">selected</c:if>
						value='<c:out value="${dep.id}"/>'><c:out
						value="${dep.name}" /></option>
				</c:forEach>
			</c:if>
		</select></td>
		<td>
		<div id="depIdTip"></div>
		</td>
	</tr>
	<tr>
		<td class="left_title_2">角色:</td>
		<td>
          <table class="table_style" border="0" align="center" cellspacing="1">
        	<c:if test="${success_view.rolelist != null}">
        		<c:forEach items="${success_view.rolelist}" var="role" varStatus="status">
        		<c:if test="${status.index%4==0}"><tr></c:if>
        		<td>
        			<input  type="checkbox" id="roleId" name="roleId"  <c:out value="${role.checked}"/>   value="<c:out value="${role.ROLE_ID},${role.ROLE_NAME}"/>"  /><c:out value="${role.ROLE_NAME}"/>
        		</td>
        		<c:if test="${status.count%4==0}"></tr><tr></c:if>
        		</c:forEach>
        	</c:if>
        </table>
         </td>
		<td>
		<div id="roleIdTip"></div>
		</td>
	</tr>
</table>
<table class="table_style" border="0" align="center" cellpadding="3"
	cellspacing="1">
	<tr>
		<td>
		<input type="hidden"  id="prv"  name="prv" value="update" />
		<input type="hidden" name="id"
			value='<c:out value="${success_view.userid}"/>' /> <input
			type="submit" onclick="return empnoUnique();" value="提交" /> <span class="sub_sp">&nbsp;</span> <input
			type="reset" value="重置" /></td>
	</tr>
</table>
</form>
</div>
</body>
</html>